1300 |
Is it possible to cancel or discard the values during validation
// ValidateValue event - Occurs before user changes the cell's value. void __fastcall TForm1::G2antt1ValidateValue(TObject *Sender,Exg2anttlib_tlb::HITEM Item,long ColIndex,Variant NewValue,VARIANT_BOOL * Cancel) { OutputDebugString( L"ValidateValue" ); OutputDebugString( L"NewValue" ); OutputDebugString( L"Change the Cancel parameter for ValidateValue event to accept/decline the newly value. " ); OutputDebugString( L"The DiscardValidateValue restores back the previously values." ); G2antt1->DiscardValidateValue(); } G2antt1->BeginUpdate(); G2antt1->Chart->set_PaneWidth(true,0); G2antt1->CauseValidateValue = Exg2anttlib_tlb::ValidateValueType::exValidateCell; G2antt1->Columns->Add(L"Date")->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::DateType; G2antt1->Columns->Add(L"Text")->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::EditType; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->set_CellValue(TVariant(var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double()))),TVariant(1),TVariant("text")); var_Items->set_CellValue(TVariant(var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double()))),TVariant(1),TVariant("text")); var_Items->set_CellValue(TVariant(var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double()))),TVariant(1),TVariant("text")); var_Items->set_CellValue(TVariant(var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double()))),TVariant(1),TVariant("text")); var_Items->set_CellValue(TVariant(var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double()))),TVariant(1),TVariant("text")); G2antt1->EndUpdate(); |
1299 |
Is it possible to validate the values of the cells only when user leaves the focused item
// ValidateValue event - Occurs before user changes the cell's value. void __fastcall TForm1::G2antt1ValidateValue(TObject *Sender,Exg2anttlib_tlb::HITEM Item,long ColIndex,Variant NewValue,VARIANT_BOOL * Cancel) { OutputDebugString( L"ValidateValue" ); OutputDebugString( L"NewValue" ); OutputDebugString( L"Change the Cancel parameter for ValidateValue event to accept/decline the newly value. " ); Cancel = true; OutputDebugString( L"You can not leave the item/record until the Cancel is False." ); } G2antt1->BeginUpdate(); G2antt1->Chart->set_PaneWidth(true,0); G2antt1->CauseValidateValue = Exg2anttlib_tlb::ValidateValueType::exValidateItem; G2antt1->Columns->Add(L"Date")->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::DateType; G2antt1->Columns->Add(L"Text")->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::EditType; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->set_CellValue(TVariant(var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double()))),TVariant(1),TVariant("text")); var_Items->set_CellValue(TVariant(var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double()))),TVariant(1),TVariant("text")); var_Items->set_CellValue(TVariant(var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double()))),TVariant(1),TVariant("text")); var_Items->set_CellValue(TVariant(var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double()))),TVariant(1),TVariant("text")); var_Items->set_CellValue(TVariant(var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double()))),TVariant(1),TVariant("text")); G2antt1->EndUpdate(); |
1298 |
We would like to validate the values of the cells. Is it possible
// ValidateValue event - Occurs before user changes the cell's value. void __fastcall TForm1::G2antt1ValidateValue(TObject *Sender,Exg2anttlib_tlb::HITEM Item,long ColIndex,Variant NewValue,VARIANT_BOOL * Cancel) { OutputDebugString( L"ValidateValue" ); OutputDebugString( L"NewValue" ); OutputDebugString( L"Change the Cancel parameter for ValidateValue event to accept/decline the newly value." ); Cancel = true; OutputDebugString( L"You can not leave the cell until the Cancel is False." ); } G2antt1->BeginUpdate(); G2antt1->Chart->set_PaneWidth(true,0); G2antt1->CauseValidateValue = Exg2anttlib_tlb::ValidateValueType::exValidateCell; G2antt1->Columns->Add(L"Date")->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::DateType; G2antt1->Columns->Add(L"Text")->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::EditType; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->set_CellValue(TVariant(var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double()))),TVariant(1),TVariant("text")); var_Items->set_CellValue(TVariant(var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double()))),TVariant(1),TVariant("text")); var_Items->set_CellValue(TVariant(var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double()))),TVariant(1),TVariant("text")); var_Items->set_CellValue(TVariant(var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double()))),TVariant(1),TVariant("text")); var_Items->set_CellValue(TVariant(var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double()))),TVariant(1),TVariant("text")); G2antt1->EndUpdate(); |
1297 |
Is there any way to add auto-numbering
Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Items"); Exg2anttlib_tlb::IColumnPtr var_Column = var_Columns->Add(L"Pos"); var_Column->FormatColumn = L"1 pos ''"; var_Column->Position = 0; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddItem(TVariant("Item 1")); var_Items->AddItem(TVariant("Item 2")); var_Items->AddItem(TVariant("Item 3")); |
1296 |
How can I format my column to display the percent values “5,00%”
G2antt1->Columns->Add(L"Percent")->FormatColumn = L"((dbl(value) * 100) format '2|,|3.')+'%'"; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddItem(TVariant(0.5)); var_Items->AddItem(TVariant(0.4)); var_Items->AddItem(TVariant(0.75)); |
1295 |
I can't control bar's transparency if the bar is overlaid. What can be done
G2antt1->ScrollBySingleLine = true; G2antt1->Columns->Add(L"Task"); G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exHLines; Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exHLines; var_Chart->AllowCreateBar = Exg2anttlib_tlb::CreateBarEnum::exCreateBarAuto; var_Chart->AllowLinkBars = false; var_Chart->ResizeUnitScale = Exg2anttlib_tlb::UnitEnum::exHour; var_Chart->set_PaneWidth(false,48); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Task")); var_Bar->OverlaidType = Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStackAutoArrange | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStack; var_Bar->set_Overlaid(Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsTransparent,TVariant(0)); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("A1"),TNoParam()); var_Items->set_ItemBar(h,TVariant("A1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarTransparent,TVariant(80)); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("A2"),TNoParam()); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,4).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant("A3"),TNoParam()); h = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,7).operator double()),TVariant(TDateTime(2001,1,10).operator double()),TVariant("A1"),TNoParam()); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,12).operator double()),TVariant("A3"),TNoParam()); var_Items->set_ItemBar(h,TVariant("A3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarTransparent,TVariant(50)); |
1294 |
How can I show the child items with no identation
G2antt1->LinesAtRoot = Exg2anttlib_tlb::LinesAtRootEnum::exGroupLinesOutside; G2antt1->Indent = 12; G2antt1->HasLines = Exg2anttlib_tlb::HierarchyLineEnum::exThinLine; G2antt1->Columns->Add(L"Default"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Root 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 3")); var_Items->set_ExpandItem(h,true); h = var_Items->AddItem(TVariant("Root 2")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 3")); |
1293 |
Is there other ways of showing the hierarchy lines (exGroupLinesAtRoot)
|
1292 |
Is there other ways of showing the hierarchy lines (exGroupLinesOutside)
G2antt1->LinesAtRoot = Exg2anttlib_tlb::LinesAtRootEnum::exGroupLinesOutside; G2antt1->Indent = 12; G2antt1->Columns->Add(L"Default"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Root 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 3")); var_Items->set_ExpandItem(h,true); h = var_Items->AddItem(TVariant("Root 2")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 3")); |
1291 |
Is there other ways of showing the hierarchy lines (exGroupLinesInsideLeaf)
|
1290 |
Is there other ways of showing the hierarchy lines (exGroupLinesInside)
|
1289 |
Is there other ways of showing the hierarchy lines (exGroupLines)
|
1288 |
How can I specify non-working dates for any year, as a repetitive expression for instance
|
1287 |
Is it possible to specify the Easter and a day after as being non-working
|
1286 |
Here's a simple sample to compute the Easter day
G2antt1->BeginUpdate(); G2antt1->Chart->set_PaneWidth(true,0); Exg2anttlib_tlb::IEditorPtr var_Editor = G2antt1->Columns->Add(L"Year")->Editor; var_Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::SpinType; var_Editor->Numeric = Exg2anttlib_tlb::NumericEnum::exInteger; G2antt1->Columns->Add(L"Easter")->ComputedField = TVariant(String("date(dateS('3/1/' + int(%0)) + ((1:=(((255 - 11 * (int(%0) mod 19)) - 21) mod 30) + 21) + (=:1 > 48 ? -1 : 0) + 6 - ((int(%0) +") + " int(int(%0) / 4)) + =:1 + (=:1 > 48 ? -1 : 0) + 1) mod 7))"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddItem(TVariant(2008)); var_Items->AddItem(TVariant(2009)); var_Items->AddItem(TVariant(2010)); var_Items->AddItem(TVariant(2011)); G2antt1->EndUpdate(); |
1285 |
How do I specify the Easter or holydays as non-working
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->AdjustLevelsToBase = true; var_Chart->set_PaneWidth(false,0); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2011,4,14).operator double())); var_Chart->FirstWeekDay = Exg2anttlib_tlb::WeekDayEnum::exMonday; var_Chart->LevelCount = 2; var_Chart->NonworkingDays = 0; var_Chart->AddNonworkingDate(TVariant("month(value) = 7")); var_Chart->AddNonworkingDate(TVariant(String("not(month(value) in (3,4)) ? 0 : ( floor(value)=floor(date(dateS('3/1/' + year(value)) + ((1:=(((255 - 11 * (year(value) mod 19") + ")) - 21) mod 30) + 21) + (=:1 > 48 ? -1 : 0) + 6 - ((year(value) + int(year(value) / 4)) + =:1 + (=:1 > 48 ? -1 : 0) + 1) mod 7)" + ")))")); |
1284 |
Is it possible to add a repetitive expression to define non-working dates
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,0); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2010,1,1).operator double())); var_Chart->FirstWeekDay = Exg2anttlib_tlb::WeekDayEnum::exMonday; var_Chart->LevelCount = 2; var_Chart->AddNonworkingDate(TVariant(TDateTime(2010,1,13).operator double())); var_Chart->AddNonworkingDate(TVariant("month(value) = 1 and (day(value) in (1,6))")); |
1283 |
How do I get the Easter date
G2antt1->Columns->Add(L"Easter")->FormatColumn = TVariant(String("date(dateS('3/1/' + year(value)) + ((1:=(((255 - 11 * (year(value) mod 19)) - 21) mod 30) + 21) + (=:1 > 48 ? -1 : 0) + 6 - ((") + "year(value) + int(year(value) / 4)) + =:1 + (=:1 > 48 ? -1 : 0) + 1) mod 7))"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddItem(TVariant(TDateTime(1989,1,1).operator double())); var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double())); var_Items->AddItem(TVariant(TDateTime(2002,1,1).operator double())); var_Items->AddItem(TVariant(TDateTime(2003,1,1).operator double())); var_Items->AddItem(TVariant(TDateTime(2010,1,1).operator double())); |
1282 |
How can I calculate the number of visible units
// Click event - Occurs when the user presses and then releases the left mouse button over the tree control. void __fastcall TForm1::G2antt1Click(TObject *Sender) { Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; OutputDebugString( L"UnitCount:" ); OutputDebugString( PChar(var_Chart->get_CountVisibleUnits(TVariant(var_Chart->get_DateFromPoint(0,-1)),TVariant(var_Chart->get_DateFromPoint(1,-1)))) ); } Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,0); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2010,1,1).operator double())); var_Chart->LevelCount = 2; |
1281 |
Is it possible to specify the nonworking up to minutes and I can see when using the inside zoom feature
G2antt1->BeginUpdate(); G2antt1->Chart->Bars->Add(L"Task:Split")->Shortcut = L"Task"; G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exHLines; Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines; var_Chart->set_PaneWidth(false,128); var_Chart->LevelCount = 3; var_Chart->UnitScale = Exg2anttlib_tlb::UnitEnum::exHour; var_Chart->UnitWidth = 16; var_Chart->DrawLevelSeparator = Exg2anttlib_tlb::LevelLineEnum::exLevelNoLine; Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(2); var_Level->Unit = Exg2anttlib_tlb::UnitEnum::exMinute; var_Level->Count = 60; var_Chart->AllowCreateBar = Exg2anttlib_tlb::CreateBarEnum::exCreateBarAuto; var_Chart->ResizeUnitScale = Exg2anttlib_tlb::UnitEnum::exMinute; var_Chart->ResizeUnitCount = 15; var_Chart->AllowInsideZoom = true; Exg2anttlib_tlb::IInsideZoomFormatPtr var_InsideZoomFormat = var_Chart->DefaultInsideZoomFormat; var_InsideZoomFormat->InsideUnit = Exg2anttlib_tlb::UnitEnum::exMinute; var_InsideZoomFormat->InsideCount = 15; var_InsideZoomFormat->InsideLabel = L"<%nn%>"; var_InsideZoomFormat->OwnerLabel = L"Hour: <b><%h%>"; var_InsideZoomFormat->DrawGridLines = true; var_Chart->InsideZooms->Add(TVariant(TDateTime(2010,1,1,12,00,00,0).operator double())); var_Chart->InsideZooms->Add(TVariant(TDateTime(2010,1,1,13,00,00,0).operator double())); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2010,1,1,9,00,00,0).operator double())); G2antt1->Columns->Add(L"Non-Working")->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellSingleLine,TVariant(false)); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("12:30 to 14:00 Monday to Thursday, 12:30 to 13:30 on Friday")); var_Items->set_ItemNonworkingUnits(h,TVariant(false),TVariant(String("weekday(value) case (default:((timeF(value)>=\"12:30:00\" and timeF(value) <=\"14:00:00\" ));5:( timeF(value)>=\"12:30:00\" and") + " timeF(value) <=\"13:30:00\" );6:1;0:1) ")); h = var_Items->AddItem(TVariant("10:45 to 13:45 Monday to Thursday, 10:45 to 14:30 on Friday")); var_Items->set_ItemNonworkingUnits(h,TVariant(false),TVariant(String("weekday(value) case (default:((timeF(value)>=\"10:45:00\" and timeF(value) <=\"13:45:00\" ));5:( timeF(value)>=\"10:45:00\" and") + " timeF(value) <=\"14:30:00\" );6:1;0:1) ")); h = var_Items->AddItem(TVariant("2:30 to 9:30 on Friday, Saturday and Sunday")); var_Items->set_ItemNonworkingUnits(h,TVariant(false),L"weekday(value) case (default:((timeF(value)>=\"02:30:00\" and timeF(value) <=\"09:30:00\" ));1:0;2:0;3:0;4:0) "); G2antt1->EndUpdate(); |
1280 |
Is it possible to show the non-working units up to minutes
G2antt1->BeginUpdate(); G2antt1->Chart->Bars->Add(L"Task:Split")->Shortcut = L"Task"; G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exHLines; Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exHLines; var_Chart->set_PaneWidth(false,128); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2010,1,1).operator double())); var_Chart->LevelCount = 2; var_Chart->UnitScale = Exg2anttlib_tlb::UnitEnum::exHour; var_Chart->UnitWidth = 16; var_Chart->DrawLevelSeparator = Exg2anttlib_tlb::LevelLineEnum::exLevelNoLine; Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(1); var_Level->Unit = Exg2anttlib_tlb::UnitEnum::exMinute; var_Level->Count = 60; var_Chart->AllowCreateBar = Exg2anttlib_tlb::CreateBarEnum::exCreateBarAuto; var_Chart->ResizeUnitScale = Exg2anttlib_tlb::UnitEnum::exMinute; var_Chart->ResizeUnitCount = 15; G2antt1->Columns->Add(L"Non-Working")->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellSingleLine,TVariant(false)); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("12:30 to 14:00 Monday to Thursday, 12:30 to 13:30 on Friday")); var_Items->set_ItemNonworkingUnits(h,TVariant(false),TVariant(String("weekday(value) case (default:((timeF(value)>=\"12:30:00\" and timeF(value) <=\"14:00:00\" ));5:( timeF(value)>=\"12:30:00\" and") + " timeF(value) <=\"13:30:00\" );6:1;0:1) ")); h = var_Items->AddItem(TVariant("10:45 to 13:45 Monday to Thursday, 10:45 to 14:30 on Friday")); var_Items->set_ItemNonworkingUnits(h,TVariant(false),TVariant(String("weekday(value) case (default:((timeF(value)>=\"10:45:00\" and timeF(value) <=\"13:45:00\" ));5:( timeF(value)>=\"10:45:00\" and") + " timeF(value) <=\"14:30:00\" );6:1;0:1) ")); h = var_Items->AddItem(TVariant("2:30 to 9:30 on Friday, Saturday and Sunday")); var_Items->set_ItemNonworkingUnits(h,TVariant(false),L"weekday(value) case (default:((timeF(value)>=\"02:30:00\" and timeF(value) <=\"09:30:00\" ));1:0;2:0;3:0;4:0) "); G2antt1->EndUpdate(); |
1279 |
Is it possible to define several type of progress bars
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Tasks"); G2antt1->Columns->Add(L"Start")->Visible = false; G2antt1->Columns->Add(L"End")->Visible = false; Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double())); var_Chart->set_PaneWidth(false,64); Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->Copy(L"Progress",L"ProgressT"); var_Bar->Color = RGB(255,0,0); var_Bar->Shape = Exg2anttlib_tlb::ShapeBarEnum::exShapeSolid; var_Bar->Height = 7; var_Chart->Bars->Add(L"Task%ProgressT:Split")->Shortcut = L"Task"; Exg2anttlib_tlb::IBarPtr var_Bar1 = var_Chart->Bars->get_Item(TVariant("Progress")); var_Bar1->Color = RGB(0,0,255); var_Bar1->Shape = Exg2anttlib_tlb::ShapeBarEnum::exShapeSolidUp; var_Chart->Bars->Add(L"Summary%Progress")->Shortcut = L"Summary"; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Project")); var_Items->set_ItemHeight(h,16); var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant(TDateTime(2006,9,21).operator double())); var_Items->set_CellValue(TVariant(h),TVariant(2),TVariant(TDateTime(2006,10,3).operator double())); var_Items->AddBar(h,TVariant("Summary"),TVariant(var_Items->get_CellValue(TVariant(h),TVariant(1))),TVariant(var_Items->get_CellValue(TVariant(h),TVariant(2))),TVariant("sum"),TNoParam()); var_Items->set_ItemBar(h,TVariant("sum"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarPercent,TVariant(0.4)); var_Items->set_ItemBar(h,TVariant("sum"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarShowPercentCaption,TVariant(true)); long h1 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 1")); var_Items->set_CellValue(TVariant(h1),TVariant(1),TVariant(var_Items->get_CellValue(TVariant(h),TVariant(1)))); var_Items->set_CellValue(TVariant(h1),TVariant(2),TVariant(TDateTime(2006,9,27).operator double())); var_Items->AddBar(h1,TVariant("Task"),TVariant(var_Items->get_CellValue(TVariant(h1),TVariant(1))),TVariant(var_Items->get_CellValue(TVariant(h1),TVariant(2))),TVariant("K1"),TNoParam()); var_Items->set_ItemBar(h1,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarPercent,TVariant(0.6)); var_Items->set_ItemBar(h1,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarShowPercentCaption,TVariant(true)); long h2 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 2")); var_Items->set_CellValue(TVariant(h2),TVariant(1),TVariant(var_Items->get_CellValue(TVariant(h1),TVariant(2)))); var_Items->set_CellValue(TVariant(h2),TVariant(2),TVariant(TDateTime(2006,9,28).operator double())); var_Items->AddBar(h2,TVariant("Unknown"),TVariant(var_Items->get_CellValue(TVariant(h2),TVariant(1))),TVariant(var_Items->get_CellValue(TVariant(h2),TVariant(2))),TVariant("K2"),TNoParam()); var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2")); long h3 = var_Items->InsertItem(h,TNoParam(),TVariant("Task 3")); var_Items->set_CellValue(TVariant(h3),TVariant(1),TVariant(var_Items->get_CellValue(TVariant(h2),TVariant(2)))); var_Items->set_CellValue(TVariant(h3),TVariant(2),TVariant(var_Items->get_CellValue(TVariant(h),TVariant(2)))); var_Items->AddBar(h3,TVariant("Task"),TVariant(var_Items->get_CellValue(TVariant(h3),TVariant(1))),TVariant(var_Items->get_CellValue(TVariant(h3),TVariant(2))),TVariant("K3"),TNoParam()); var_Items->set_ItemBar(h3,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarPercent,TVariant(0.65)); var_Items->set_ItemBar(h3,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarShowPercentCaption,TVariant(true)); var_Items->set_ItemBar(h3,TVariant("K3"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarPercentColor,TVariant(32768)); var_Items->AddLink(TVariant("L2"),h2,TVariant("K2"),h3,TVariant("K3")); var_Items->GroupBars(h1,TVariant("K1"),false,h2,TVariant("K2"),true,TVariant(31),TVariant("0;4")); var_Items->GroupBars(h2,TVariant("K2"),false,h3,TVariant("K3"),true,TVariant(31),TVariant("0;2")); var_Items->DefineSummaryBars(h,TVariant("sum"),h1,TVariant("K1")); var_Items->DefineSummaryBars(h,TVariant("sum"),h2,TVariant("K2")); var_Items->DefineSummaryBars(h,TVariant("sum"),h3,TVariant("K3")); var_Items->set_ExpandItem(h,true); var_Items->set_ItemBold(h,true); G2antt1->EndUpdate(); |
1278 |
Is it possible to display the percent bar over the summary bar
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->LevelCount = 2; var_Chart->set_PaneWidth(false,64); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Progress")); var_Bar->Color = RGB(0,0,255); var_Bar->Shape = Exg2anttlib_tlb::ShapeBarEnum::exShapeSolidUp; var_Chart->Bars->Add(L"Summary%Progress")->Shortcut = L"SummaryP"; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Summary")); var_Items->AddBar(h,TVariant("SummaryP"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K1"),TNoParam()); var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarPercent,TVariant(0.4)); var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarShowPercentCaption,TVariant(true)); G2antt1->EndUpdate(); |
1277 |
How can I display the percent value in the lower side of the bar
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,48); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Progress")); var_Bar->Shape = Exg2anttlib_tlb::ShapeBarEnum::exShapeSolid; var_Bar->Height = 7; var_Bar->Color = RGB(0,0,255); var_Chart->Bars->Add(L"Task%Progress")->Shortcut = L"Percent"; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h,TVariant("Percent"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K1"),TNoParam()); var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarPercent,TVariant(0.5)); var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarShowPercentCaption,TVariant(true)); var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarVAlignPercent,TVariant(2)); h = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h,TVariant("Percent"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,9).operator double()),TVariant("K2"),TNoParam()); G2antt1->EndUpdate(); |
1276 |
Is it possible to change the percent's height
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,48); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Progress")); var_Bar->Shape = Exg2anttlib_tlb::ShapeBarEnum::exShapeSolid; var_Bar->Height = 7; var_Chart->Bars->Add(L"Task%Progress"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h,TVariant("Task%Progress"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K1"),TNoParam()); var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarPercent,TVariant(0.5)); var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarShowPercentCaption,TVariant(true)); G2antt1->EndUpdate(); |
1275 |
How can I change the pattern for the percent bar
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,48); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Progress")); var_Bar->Pattern = Exg2anttlib_tlb::PatternEnum::exPatternBDiagonal; var_Bar->Shape = Exg2anttlib_tlb::ShapeBarEnum::exShapeSolid; var_Bar->Color = RGB(196,0,0); var_Chart->Bars->Add(L"Task%Progress"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h,TVariant("Task%Progress"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K1"),TNoParam()); var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarPercent,TVariant(0.4)); var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarShowPercentCaption,TVariant(true)); G2antt1->EndUpdate(); |
1274 |
How can I change the look for the percent bar using EBN
G2antt1->BeginUpdate(); G2antt1->VisualAppearance->Add(1,TVariant("c:\\exontrol\\images\\hot.ebn")); G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Progress")); var_Bar->Color = 0x1000000; var_Bar->Shape = Exg2anttlib_tlb::ShapeBarEnum::exShapeSolid; var_Bar->Height = 7; var_Chart->Bars->Add(L"Task%Progress"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h,TVariant("Task%Progress"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,6).operator double()),TVariant("K1"),TNoParam()); var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarPercent,TVariant(0.4)); G2antt1->EndUpdate(); |
1273 |
Is it possible to align the percent bar to the bottom of the bar
G2antt1->BeginUpdate(); G2antt1->DefaultItemHeight = 32; G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,64); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->Bars->get_Item(TVariant("Task"))->Height = 28; var_Chart->Bars->Add(L"Task%Progress")->Shortcut = L"Percent"; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h,TVariant("Percent"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,14).operator double()),TVariant("K1"),TVariant("text inside")); var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarVAlignCaption,TVariant(0)); var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarPercent,TVariant(0.75)); var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarShowPercentCaption,TVariant(true)); var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarPercentCaptionFormat,TVariant("%p%")); var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarVAlignPercent,TVariant(2)); G2antt1->EndUpdate(); |
1272 |
Is it possible to show the percent on the bottom side of the bar, so I can leave the text upside
G2antt1->BeginUpdate(); G2antt1->DefaultItemHeight = 32; G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,64); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Exg2anttlib_tlb::IBarsPtr var_Bars = var_Chart->Bars; var_Bars->get_Item(TVariant("Task"))->Height = 28; Exg2anttlib_tlb::IBarPtr var_Bar = var_Bars->get_Item(TVariant("Progress")); var_Bar->Shape = Exg2anttlib_tlb::ShapeBarEnum::exShapeThinDown; var_Bar->Height = 20; var_Bar->Color = RGB(0,0,255); var_Bars->Add(L"Task%Progress")->Shortcut = L"Percent"; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h,TVariant("Percent"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,14).operator double()),TVariant("K1"),TVariant("text inside")); var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarVAlignCaption,TVariant(0)); var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarPercent,TVariant(0.75)); var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarShowPercentCaption,TVariant(true)); var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarPercentCaptionFormat,TVariant("<br>%p%")); var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarAlignPercentCaption,TVariant(1)); var_Items->set_ItemBar(h,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarCanResizePercent,TVariant(false)); G2antt1->EndUpdate(); |
1271 |
Is it possible to assign a multiple lines labels/captions to a bar
|
1270 |
Does your control supports multiple lines tooltip
|
1269 |
It is possible to write the word in red/color or to add a tooltip or a link to the word
G2antt1->Columns->Add(L"Task"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->LevelCount = 2; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2000,12,26).operator double())); var_Chart->set_PaneWidth(false,32); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant(""),TVariant(TDateTime(2001,1,1).operator double()),TVariant(TDateTime(2001,1,5).operator double()),TVariant("K1"),TVariant("some <fgcolor=FF0000>red</fgcolor> text")); var_Items->set_ItemBar(h1,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarCanResize,TVariant(false)); var_Items->set_ItemBar(h1,TVariant("K1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarToolTip,TVariant("And here goes the <b>tooltip</b> of the text. ")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2001,1,5).operator double()),TVariant(TDateTime(2001,1,7).operator double()),TVariant("K2"),TNoParam()); var_Items->set_ItemBar(h2,TVariant("K2"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarToolTip,TVariant("And here goes the <b>tooltip</b> of the bar. ")); var_Items->AddLink(TVariant("L1"),h1,TVariant("K1"),h2,TVariant("K2")); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("L<b>inke</b>d to a bar")); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkToolTip,TVariant("And here goes the <b>tooltip</b> of the link. ")); |
1268 |
It is possible to use seconds/minutes/hours as time scale in your control, but using my regional settings
G2antt1->BeginUpdate(); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exMonth,L"<|><%loc_m1%><|><%loc_m2%><|><%loc_m3%><|><%loc_mmmm%><|><%loc_m3%> '<%yy%><|><%loc_mmmm%> <%yyyy%>"); var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exWeek,L"<|><%ww%><|><%loc_m3%> <%d%>, '<%yy%><r><%ww%><|><%loc_mmmm%> <%d%>, <%yyyy%><r><%ww%><||><||>256"); var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exDay,TVariant(String("<|><%loc_d1%><|><%loc_d2%><|><%loc_d3%><|><%loc_dddd%><|><%loc_d3%>, <%loc_m3%> <%d%>, '<%yy%><|><%loc_dddd%>, <%loc_mmmm%> <%d") + "%>, <%yyyy%><||><||>4096")); var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exHour,TVariant(String("<|><%hh%><|><%h%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, '<%yy%> <%h%> <%AM/PM%><|><%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%") + "> <%h%> <%AM/PM%><||><||>65536")); var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exMinute,TVariant(String("<|><%nn%><|><%h%>:<%nn%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, '<%yy%> <%h%>:<%nn%> <%AM/PM%><|><%loc_dddd%>, <%loc_mmmm%> ") + "<%d%>, <%yyyy%> <%h%>:<%nn%> <%AM/PM%>")); var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exSecond,TVariant(String("<|><%ss%><|><%nn%>:<%ss%><|><%h%>:<%nn%>:<%ss%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, '<%yy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>") + "<|><%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>")); var_Chart->set_LabelToolTip(Exg2anttlib_tlb::UnitEnum::exMonth,L"<%loc_mmmm%>/<%yyyy%>"); var_Chart->set_LabelToolTip(Exg2anttlib_tlb::UnitEnum::exWeek,L"<%loc_mmmm%> <%d%>, <%yyyy%> <%ww%>"); var_Chart->set_LabelToolTip(Exg2anttlib_tlb::UnitEnum::exDay,L"<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%>"); var_Chart->set_LabelToolTip(Exg2anttlib_tlb::UnitEnum::exHour,L"<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%> <%AM/PM%>"); var_Chart->set_LabelToolTip(Exg2anttlib_tlb::UnitEnum::exMinute,L"<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%> <%AM/PM%>"); var_Chart->set_LabelToolTip(Exg2anttlib_tlb::UnitEnum::exSecond,L"<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>"); Exg2anttlib_tlb::IChartPtr var_Chart1 = G2antt1->Chart; var_Chart1->set_PaneWidth(false,0); var_Chart1->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart1->LevelCount = 4; var_Chart1->get_Level(0)->set_Label(TVariant(4096)); var_Chart1->get_Level(1)->set_Label(TVariant(65536)); var_Chart1->get_Level(2)->set_Label(TVariant(1048576)); Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart1->get_Level(3); var_Level->Count = 15; var_Level->set_Label(TVariant(16777216)); G2antt1->EndUpdate(); |
1267 |
The chart's header is displayed in English. Can I change so it is the same as in my regional settings
G2antt1->BeginUpdate(); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exMonth,L"<|><%loc_m1%><|><%loc_m2%><|><%loc_m3%><|><%loc_mmmm%><|><%loc_m3%> '<%yy%><|><%loc_mmmm%> <%yyyy%>"); var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exWeek,L"<|><%ww%><|><%loc_m3%> <%d%>, '<%yy%><r><%ww%><|><%loc_mmmm%> <%d%>, <%yyyy%><r><%ww%><||><||>256"); var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exDay,TVariant(String("<|><%loc_d1%><|><%loc_d2%><|><%loc_d3%><|><%loc_dddd%><|><%loc_d3%>, <%loc_m3%> <%d%>, '<%yy%><|><%loc_dddd%>, <%loc_mmmm%> <%d") + "%>, <%yyyy%><||><||>4096")); var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exHour,TVariant(String("<|><%hh%><|><%h%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, '<%yy%> <%h%> <%AM/PM%><|><%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%") + "> <%h%> <%AM/PM%><||><||>65536")); var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exMinute,TVariant(String("<|><%nn%><|><%h%>:<%nn%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, '<%yy%> <%h%>:<%nn%> <%AM/PM%><|><%loc_dddd%>, <%loc_mmmm%> ") + "<%d%>, <%yyyy%> <%h%>:<%nn%> <%AM/PM%>")); var_Chart->set_Label(Exg2anttlib_tlb::UnitEnum::exSecond,TVariant(String("<|><%ss%><|><%nn%>:<%ss%><|><%h%>:<%nn%>:<%ss%> <%AM/PM%><|><%loc_d3%>, <%loc_m3%> <%d%>, '<%yy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>") + "<|><%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>")); var_Chart->set_LabelToolTip(Exg2anttlib_tlb::UnitEnum::exMonth,L"<%loc_mmmm%>/<%yyyy%>"); var_Chart->set_LabelToolTip(Exg2anttlib_tlb::UnitEnum::exWeek,L"<%loc_mmmm%> <%d%>, <%yyyy%> <%ww%>"); var_Chart->set_LabelToolTip(Exg2anttlib_tlb::UnitEnum::exDay,L"<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%>"); var_Chart->set_LabelToolTip(Exg2anttlib_tlb::UnitEnum::exHour,L"<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%> <%AM/PM%>"); var_Chart->set_LabelToolTip(Exg2anttlib_tlb::UnitEnum::exMinute,L"<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%> <%AM/PM%>"); var_Chart->set_LabelToolTip(Exg2anttlib_tlb::UnitEnum::exSecond,L"<%loc_dddd%>, <%loc_mmmm%> <%d%>, <%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>"); Exg2anttlib_tlb::IChartPtr var_Chart1 = G2antt1->Chart; var_Chart1->set_PaneWidth(false,0); var_Chart1->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart1->LevelCount = 2; var_Chart1->UnitScale = Exg2anttlib_tlb::UnitEnum::exDay; G2antt1->EndUpdate(); |
1266 |
It is possible to use seconds/minutes/hours as time scale in your control
|
1265 |
Is it possible to resize chart's column/level using the mouse as we can for the columns, but do not want to resize up to hours
G2antt1->BeginUpdate(); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,32); var_Chart->LevelCount = 2; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2008,1,1).operator double())); var_Chart->AllowInsideZoom = true; var_Chart->AllowResizeInsideZoom = true; var_Chart->InsideZoomOnDblClick = false; Exg2anttlib_tlb::IInsideZoomFormatPtr var_InsideZoomFormat = var_Chart->DefaultInsideZoomFormat; var_InsideZoomFormat->OwnerLabel = L"<%d%>"; var_InsideZoomFormat->InsideLabel = L""; var_InsideZoomFormat->InsideUnit = Exg2anttlib_tlb::UnitEnum::exHour; var_InsideZoomFormat->InsideCount = 24; var_InsideZoomFormat->DrawTickLines = false; var_InsideZoomFormat->DrawGridLines = false; Exg2anttlib_tlb::IInsideZoomsPtr var_InsideZooms = var_Chart->InsideZooms; var_InsideZooms->SplitBaseLevel = false; var_InsideZooms->DefaultWidth = 18; G2antt1->Columns->Add(L"Default"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Task")),TVariant("Task"),TVariant(TDateTime(2008,1,3).operator double()),TVariant(TDateTime(2008,1,8).operator double()),TNoParam(),TNoParam()); G2antt1->EndUpdate(); |
1264 |
Is it possible to resize chart's column/level using the mouse as we can for the columns
G2antt1->BeginUpdate(); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,32); var_Chart->LevelCount = 2; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2008,1,1).operator double())); var_Chart->AllowInsideZoom = true; var_Chart->AllowResizeInsideZoom = true; var_Chart->InsideZoomOnDblClick = false; Exg2anttlib_tlb::IInsideZoomFormatPtr var_InsideZoomFormat = var_Chart->DefaultInsideZoomFormat; var_InsideZoomFormat->OwnerLabel = L"<%d%>"; var_InsideZoomFormat->InsideLabel = L""; var_InsideZoomFormat->DrawTickLines = false; var_InsideZoomFormat->DrawGridLines = false; Exg2anttlib_tlb::IInsideZoomsPtr var_InsideZooms = var_Chart->InsideZooms; var_InsideZooms->SplitBaseLevel = false; var_InsideZooms->DefaultWidth = 18; G2antt1->Columns->Add(L"Default"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Task")),TVariant("Task"),TVariant(TDateTime(2008,1,3).operator double()),TVariant(TDateTime(2008,1,8).operator double()),TNoParam(),TNoParam()); G2antt1->EndUpdate(); |
1263 |
How can I empty or clear the undo/redo queue
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Tasks"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->AllowUndoRedo = true; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2005,6,20).operator double())); var_Chart->AllowLinkBars = true; var_Chart->LevelCount = 2; var_Chart->set_PaneWidth(false,48); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(TDateTime(2005,6,21).operator double()),TVariant(TDateTime(2005,6,25).operator double()),TVariant(""),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2005,6,28).operator double()),TVariant(TDateTime(2005,7,2).operator double()),TVariant(""),TNoParam()); OutputDebugString( G2antt1->Chart->get_UndoListAction(TNoParam(),TNoParam()) ); OutputDebugString( L"Clear undo/redo queue" ); G2antt1->Chart->AllowUndoRedo = false; G2antt1->Chart->AllowUndoRedo = true; OutputDebugString( G2antt1->Chart->get_UndoListAction(TNoParam(),TNoParam()) ); G2antt1->EndUpdate(); |
1262 |
How can I remove the undo/redo queue
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Tasks"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->AllowUndoRedo = true; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2005,6,20).operator double())); var_Chart->AllowLinkBars = true; var_Chart->LevelCount = 2; var_Chart->set_PaneWidth(false,48); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(TDateTime(2005,6,21).operator double()),TVariant(TDateTime(2005,6,25).operator double()),TVariant(""),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2005,6,28).operator double()),TVariant(TDateTime(2005,7,2).operator double()),TVariant(""),TNoParam()); OutputDebugString( G2antt1->Chart->get_UndoListAction(TNoParam(),TNoParam()) ); OutputDebugString( L"Clear undo/redo queue" ); G2antt1->Chart->UndoRemoveAction(TNoParam(),TNoParam()); G2antt1->Chart->RedoRemoveAction(TNoParam(),TNoParam()); OutputDebugString( G2antt1->Chart->get_UndoListAction(TNoParam(),TNoParam()) ); G2antt1->EndUpdate(); |
1261 |
Is it possible to prevent adding an undo operation for instance the RemoveLink(LinkKey) I call during the AddLink event
// AddLink event - Occurs when the user links two bars using the mouse. void __fastcall TForm1::G2antt1AddLink(TObject *Sender,BSTR LinkKey) { G2antt1->Items->RemoveLink(TVariant(LinkKey)); G2antt1->Chart->UndoRemoveAction(TVariant(10),TVariant(1)); G2antt1->Chart->UndoRemoveAction(TVariant(11),TVariant(1)); OutputDebugString( G2antt1->Chart->get_UndoListAction(TNoParam(),TNoParam()) ); } // ChartEndChanging event - Occurs after the chart has been changed. void __fastcall TForm1::G2antt1ChartEndChanging(TObject *Sender,Exg2anttlib_tlb::BarOperationEnum Operation) { OutputDebugString( G2antt1->Chart->get_UndoListAction(TNoParam(),TNoParam()) ); } G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Tasks"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->AllowUndoRedo = true; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2005,6,20).operator double())); var_Chart->AllowLinkBars = true; var_Chart->LevelCount = 2; var_Chart->set_PaneWidth(false,48); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(TDateTime(2005,6,21).operator double()),TVariant(TDateTime(2005,6,25).operator double()),TVariant(""),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2005,6,28).operator double()),TVariant(TDateTime(2005,7,2).operator double()),TVariant(""),TNoParam()); G2antt1->EndUpdate(); |
1260 |
Is it possible to rename the links from "Link1" to my choice
// AddLink event - Occurs when the user links two bars using the mouse. void __fastcall TForm1::G2antt1AddLink(TObject *Sender,BSTR LinkKey) { G2antt1->Items->set_Link(TVariant(LinkKey),Exg2anttlib_tlb::LinkPropertyEnum::exLinkKey,TVariant("newIDlink")); } // MouseMove event - Occurs when the user moves the mouse. void __fastcall TForm1::G2antt1MouseMove(TObject *Sender,short Button,short Shift,int X,int Y) { OutputDebugString( PChar(G2antt1->Chart->get_LinkFromPoint(-1,-1)) ); } G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Tasks"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2005,6,20).operator double())); var_Chart->AllowLinkBars = true; var_Chart->LevelCount = 2; var_Chart->set_PaneWidth(false,48); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Task 1")),TVariant("Task"),TVariant(TDateTime(2005,6,21).operator double()),TVariant(TDateTime(2005,6,25).operator double()),TVariant(""),TNoParam()); var_Items->AddBar(var_Items->AddItem(TVariant("Task 2")),TVariant("Task"),TVariant(TDateTime(2005,6,28).operator double()),TVariant(TDateTime(2005,7,2).operator double()),TVariant(""),TNoParam()); G2antt1->EndUpdate(); |
1259 |
How can I prevent highlighting the column from the cursor - point
G2antt1->VisualAppearance->Add(1,TVariant(String("gBFLBCJwBAEHhEJAEGg4BI0IQAAYAQGKIYBkAKBQAGaAoDDUOQzQwAAxDKKUEwsACEIrjKCYVgOHYYRrIMYgBCMJhLEoaZLhEZRQiqDYtRDFQBSDDcPw/EaRZohGaYJ") + "gEgI=")); G2antt1->Background[Exg2anttlib_tlb::BackgroundPartEnum::exCursorHoverColumn] = 0x1000000; G2antt1->Columns->Add(L"S")->Width = 32; G2antt1->Columns->Add(L"Level 1")->set_LevelKey(TVariant(1)); G2antt1->Columns->Add(L"Level 2")->set_LevelKey(TVariant(1)); G2antt1->Columns->Add(L"Level 3")->set_LevelKey(TVariant(1)); G2antt1->Columns->Add(L"E1")->Width = 32; G2antt1->Columns->Add(L"E2")->Width = 32; G2antt1->Columns->Add(L"E3")->Width = 32; G2antt1->Columns->Add(L"E4")->Width = 32; |
1258 |
Is it possible to specify the background color for the item in the chart part only
G2antt1->Columns->Add(L"Default"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Root")); long hC = var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); G2antt1->Chart->set_ItemBackColor(hC,RGB(255,0,0)); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->set_ExpandItem(h,true); |
1257 |
Is it possible to apply different visual appearance, color, sizes for item in the list and chart part
G2antt1->VisualAppearance->Add(1,TVariant("c:\\exontrol\\images\\normal.ebn")); G2antt1->VisualAppearance->Add(2,TVariant("c:\\exontrol\\images\\pushed.ebn")); G2antt1->VisualAppearance->Add(3,TVariant("CP:2 2 2 -2 -2")); G2antt1->Columns->Add(L"Default"); G2antt1->SelBackMode = Exg2anttlib_tlb::BackModeEnum::exTransparent; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Root")); long hC = var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->set_ItemBackColor(hC,0x1ffff00); G2antt1->Chart->set_ItemBackColor(hC,0x300ff00); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->set_ExpandItem(h,true); |
1256 |
How do I change the visual appearance for the entire item, using your EBN technology
G2antt1->VisualAppearance->Add(1,TVariant("c:\\exontrol\\images\\normal.ebn")); G2antt1->Columns->Add(L"Default"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Root")); long hC = var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->set_ItemBackColor(hC,0x1000000); G2antt1->Chart->set_ItemBackColor(hC,0x1000000); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->set_ExpandItem(h,true); |
1255 |
is it possible to specify the a different background color for the item, list and chart part
G2antt1->Columns->Add(L"Default"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Root")); long hC = var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->set_ItemBackColor(hC,RGB(255,0,0)); G2antt1->Chart->set_ItemBackColor(hC,RGB(255,255,0)); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->set_ExpandItem(h,true); |
1254 |
Is it possible to specify the background color for the entire row, including the chart part
G2antt1->Columns->Add(L"Default"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Root")); long hC = var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->set_ItemBackColor(hC,RGB(255,0,0)); G2antt1->Chart->set_ItemBackColor(hC,RGB(255,0,0)); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->set_ExpandItem(h,true); |
1253 |
Is it possible to prevent overlaying the bars while moving or resizing the bars, so they get arranged once the bar is moved or resized
G2antt1->BeginUpdate(); G2antt1->ScrollBySingleLine = true; G2antt1->Columns->Add(L"Task"); G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exHLines; Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->OverlaidOnMoving = false; var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exHLines; var_Chart->AllowCreateBar = Exg2anttlib_tlb::CreateBarEnum::exCreateBarAuto; var_Chart->AllowLinkBars = false; var_Chart->ResizeUnitScale = Exg2anttlib_tlb::UnitEnum::exHour; var_Chart->set_PaneWidth(false,48); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); var_Chart->Bars->get_Item(TVariant("Task"))->OverlaidType = Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStackAutoArrange | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStack; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddItem(TVariant("")); long h = var_Items->AddItem(TVariant("Task")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,7).operator double()),TVariant(TDateTime(2001,1,10).operator double()),TVariant("A1"),TNoParam()); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,12).operator double()),TVariant("A3"),TNoParam()); G2antt1->EndUpdate(); |
1252 |
Is it possible display numbers in the same format no matter of regional settings in the control panel
G2antt1->BeginUpdate(); G2antt1->Chart->set_PaneWidth(true,0); G2antt1->Columns->Add(L"Def")->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueFormat,TVariant(1)); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant(100000.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '') + ' <fgcolor=808080>(default positive)'"); h = var_Items->AddItem(TVariant(100000.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '2|.|3|,|1|1')"); h = var_Items->AddItem(TVariant(-100000.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '') + ' <fgcolor=808080>(default negative)'"); h = var_Items->AddItem(TVariant(-100000.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '2|.|3|,|1|1')"); G2antt1->EndUpdate(); |
1251 |
Is it possible to add a 0 for numbers less than 1 instead .7 to show 0.8
G2antt1->BeginUpdate(); G2antt1->Chart->set_PaneWidth(true,0); G2antt1->Columns->Add(L"Def")->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueFormat,TVariant(1)); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant(0.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '') + ' <fgcolor=808080>(default)'"); h = var_Items->AddItem(TVariant(0.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '|||||0') + ' <fgcolor=808080>(Display no leading zeros)'"); G2antt1->EndUpdate(); |
1250 |
How can I specify the format for negative numbers
G2antt1->BeginUpdate(); G2antt1->Chart->set_PaneWidth(true,0); G2antt1->Columns->Add(L"Def")->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueFormat,TVariant(1)); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant(-100000.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '') + ' <fgcolor=808080>(default)'"); h = var_Items->AddItem(TVariant(-100000.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '||||1') + ' <fgcolor=808080>(Negative sign, number; for example, -1.1)'"); G2antt1->EndUpdate(); |
1249 |
Is it possible to change the grouping character when display numbers
G2antt1->BeginUpdate(); G2antt1->Chart->set_PaneWidth(true,0); G2antt1->Columns->Add(L"Def")->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueFormat,TVariant(1)); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant(100000.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '') + ' <fgcolor=808080>(default)'"); h = var_Items->AddItem(TVariant(100000.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '|||-') + ' <fgcolor=808080>(grouping character is -)'"); G2antt1->EndUpdate(); |
1248 |
How can I display numbers with 2 digits in each group
G2antt1->BeginUpdate(); G2antt1->Chart->set_PaneWidth(true,0); G2antt1->Columns->Add(L"Def")->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueFormat,TVariant(1)); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant(100000.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '') + ' <fgcolor=808080>(default)'"); h = var_Items->AddItem(TVariant(100000.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '||2') + ' <fgcolor=808080>(grouping by 2 digits)'"); G2antt1->EndUpdate(); |
1247 |
How can I display my numbers using a different decimal separator
G2antt1->BeginUpdate(); G2antt1->Chart->set_PaneWidth(true,0); G2antt1->Columns->Add(L"Def")->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueFormat,TVariant(1)); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant(100.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '') + ' <fgcolor=808080>(default)'"); h = var_Items->AddItem(TVariant(100.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '|;') + ' <fgcolor=808080>(decimal separator is <b>;</b>)'"); G2antt1->EndUpdate(); |
1246 |
Is it possible to display the numbers using 3 (three) digits
G2antt1->BeginUpdate(); G2antt1->Chart->set_PaneWidth(true,0); G2antt1->Columns->Add(L"Def")->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueFormat,TVariant(1)); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant(100.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '') + ' <fgcolor=808080>(default)'"); h = var_Items->AddItem(TVariant(100.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format '3') + ' <fgcolor=808080>(3 digits)'"); h = var_Items->AddItem(TVariant(100.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format 2) + ' <fgcolor=808080>(2 digits)'"); h = var_Items->AddItem(TVariant(100.27)); var_Items->set_FormatCell(TVariant(h),TVariant(0),L"(value format 1) + ' <fgcolor=808080>(1 digit)'"); G2antt1->EndUpdate(); |
1245 |
Is it possible to format numbers
G2antt1->BeginUpdate(); G2antt1->MarkSearchColumn = false; G2antt1->SelBackColor = G2antt1->BackColor; G2antt1->SelForeColor = G2antt1->ForeColor; G2antt1->ShowFocusRect = true; G2antt1->Chart->set_PaneWidth(true,0); Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Name"); Exg2anttlib_tlb::IColumnPtr var_Column = var_Columns->Add(L"A"); var_Column->SortType = Exg2anttlib_tlb::SortTypeEnum::SortNumeric; var_Column->AllowSizing = false; var_Column->Width = 36; var_Column->FormatColumn = L"len(value) ? value + ' +'"; var_Column->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::SpinType; Exg2anttlib_tlb::IColumnPtr var_Column1 = var_Columns->Add(L"B"); var_Column1->SortType = Exg2anttlib_tlb::SortTypeEnum::SortNumeric; var_Column1->AllowSizing = false; var_Column1->Width = 36; var_Column1->FormatColumn = L"len(value) ? value + ' +'"; var_Column1->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::SpinType; Exg2anttlib_tlb::IColumnPtr var_Column2 = var_Columns->Add(L"C"); var_Column2->SortType = Exg2anttlib_tlb::SortTypeEnum::SortNumeric; var_Column2->AllowSizing = false; var_Column2->Width = 36; var_Column2->FormatColumn = L"len(value) ? value + ' ='"; var_Column2->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::SpinType; Exg2anttlib_tlb::IColumnPtr var_Column3 = var_Columns->Add(L"A+B+C"); var_Column3->SortType = Exg2anttlib_tlb::SortTypeEnum::SortNumeric; var_Column3->Width = 64; var_Column3->ComputedField = L"dbl(%1)+dbl(%2)+dbl(%3)"; var_Column3->FormatColumn = TVariant(String("type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=00") + "00FF>+'+(value format '2|.|3|,' ): '0.00') )"); var_Column3->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueFormat,TVariant(1)); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Root")); var_Items->set_CellValueFormat(TVariant(h),TVariant(4),Exg2anttlib_tlb::ValueFormatEnum::exComputedField); long h1 = var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->set_CellValue(TVariant(h1),TVariant(1),TVariant(7)); var_Items->set_CellValue(TVariant(h1),TVariant(2),TVariant(3)); var_Items->set_CellValue(TVariant(h1),TVariant(3),TVariant(1)); h1 = var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->set_CellValue(TVariant(h1),TVariant(1),TVariant(-2)); var_Items->set_CellValue(TVariant(h1),TVariant(2),TVariant(-2)); var_Items->set_CellValue(TVariant(h1),TVariant(3),TVariant(-4)); h1 = var_Items->InsertItem(h,TNoParam(),TVariant("Child 3")); var_Items->set_CellValue(TVariant(h1),TVariant(1),TVariant(2)); var_Items->set_CellValue(TVariant(h1),TVariant(2),TVariant(2)); var_Items->set_CellValue(TVariant(h1),TVariant(3),TVariant(-4)); var_Items->set_ExpandItem(h,true); G2antt1->EndUpdate(); |
1244 |
How can I show the tooltip programmatically ( I want to be able to set the tooltip content dynamically just before the tooltip start to appear, not using the exBarTooltip )
// MouseMove event - Occurs when the user moves the mouse. void __fastcall TForm1::G2antt1MouseMove(TObject *Sender,short Button,short Shift,int X,int Y) { G2antt1->ShowToolTip(G2antt1->Chart->get_BarFromPoint(-1,-1),TVariant(""),TVariant(2),TVariant("4"),TVariant("-4")); } G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Def"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->AllowCreateBar = Exg2anttlib_tlb::CreateBarEnum::exNoCreateBar; var_Chart->set_PaneWidth(false,64); var_Chart->LevelCount = 2; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2010,1,1).operator double())); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2010,1,2).operator double()),TVariant(TDateTime(2010,1,5).operator double()),TVariant("A"),TVariant("A")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2010,1,5).operator double()),TVariant(TDateTime(2010,1,8).operator double()),TVariant("B"),TVariant("B")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2010,1,8).operator double()),TVariant(TDateTime(2010,1,11).operator double()),TVariant("C"),TVariant("C")); var_Items->GroupBars(h,TVariant("A"),false,h,TVariant("B"),true,TVariant(39),TNoParam()); var_Items->GroupBars(h,TVariant("B"),false,h,TVariant("C"),true,TVariant(39),TNoParam()); G2antt1->EndUpdate(); |
1243 |
How can I set the column's width to my desired width
G2antt1->ColumnAutoResize = false; Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"A")->Width = 128; var_Columns->Add(L"B")->Width = 128; G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines; |
1242 |
Is it possible to prevent intersection of three bars or more
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Def"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->AllowCreateBar = Exg2anttlib_tlb::CreateBarEnum::exNoCreateBar; var_Chart->set_PaneWidth(false,64); var_Chart->LevelCount = 2; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2010,1,1).operator double())); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2010,1,2).operator double()),TVariant(TDateTime(2010,1,5).operator double()),TVariant("A"),TVariant("A")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2010,1,5).operator double()),TVariant(TDateTime(2010,1,8).operator double()),TVariant("B"),TVariant("B")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2010,1,8).operator double()),TVariant(TDateTime(2010,1,11).operator double()),TVariant("C"),TVariant("C")); var_Items->GroupBars(h,TVariant("A"),false,h,TVariant("B"),true,TVariant(39),TNoParam()); var_Items->GroupBars(h,TVariant("B"),false,h,TVariant("C"),true,TVariant(39),TNoParam()); G2antt1->EndUpdate(); |
1241 |
Is it possible to prevent intersection of two bars
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Def"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->AllowCreateBar = Exg2anttlib_tlb::CreateBarEnum::exNoCreateBar; var_Chart->set_PaneWidth(false,64); var_Chart->LevelCount = 2; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2010,1,1).operator double())); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2010,1,2).operator double()),TVariant(TDateTime(2010,1,5).operator double()),TVariant("A"),TVariant("A")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2010,1,5).operator double()),TVariant(TDateTime(2010,1,8).operator double()),TVariant("B"),TVariant("B")); var_Items->GroupBars(h,TVariant("A"),false,h,TVariant("B"),true,TVariant(39),TNoParam()); G2antt1->EndUpdate(); |
1240 |
Is it possible to specify the cell's value but still want to display some formatted text instead the value
G2antt1->BeginUpdate(); G2antt1->Chart->set_PaneWidth(true,0); G2antt1->Columns->Add(L"Value"); G2antt1->Columns->Add(L"FormatCell"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant(1)); var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant(12)); var_Items->set_FormatCell(TVariant(h),TVariant(1),L"currency(value)"); h = var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double())); var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant(TDateTime(2001,1,1).operator double())); var_Items->set_CellValueFormat(TVariant(h),TVariant(1),Exg2anttlib_tlb::ValueFormatEnum::exHTML); var_Items->set_FormatCell(TVariant(h),TVariant(1),L"longdate(value) replace '2001' with '<b>2001</b>'"); G2antt1->EndUpdate(); |
1239 |
How can I simulate displaying groups
G2antt1->HasLines = Exg2anttlib_tlb::HierarchyLineEnum::exNoLine; G2antt1->ScrollBySingleLine = true; G2antt1->Chart->set_PaneWidth(true,0); Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Name"); var_Columns->Add(L"A"); var_Columns->Add(L"B"); var_Columns->Add(L"C"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Group 1")); var_Items->set_CellHAlignment(TVariant(h),TVariant(0),Exg2anttlib_tlb::AlignmentEnum::CenterAlignment); var_Items->set_ItemDivider(h,0); var_Items->set_ItemDividerLineAlignment(h,Exg2anttlib_tlb::DividerAlignmentEnum::DividerBoth); var_Items->set_ItemHeight(h,24); var_Items->set_SortableItem(h,false); long h1 = var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->set_CellValue(TVariant(h1),TVariant(1),TVariant(1)); var_Items->set_CellValue(TVariant(h1),TVariant(2),TVariant(2)); var_Items->set_CellValue(TVariant(h1),TVariant(3),TVariant(3)); h1 = var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->set_CellValue(TVariant(h1),TVariant(1),TVariant(4)); var_Items->set_CellValue(TVariant(h1),TVariant(2),TVariant(5)); var_Items->set_CellValue(TVariant(h1),TVariant(3),TVariant(6)); var_Items->set_ExpandItem(h,true); h = var_Items->AddItem(TVariant("Group 2")); var_Items->set_CellHAlignment(TVariant(h),TVariant(0),Exg2anttlib_tlb::AlignmentEnum::CenterAlignment); var_Items->set_ItemDivider(h,0); var_Items->set_ItemDividerLineAlignment(h,Exg2anttlib_tlb::DividerAlignmentEnum::DividerBoth); var_Items->set_ItemHeight(h,24); var_Items->set_SortableItem(h,false); h1 = var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->set_CellValue(TVariant(h1),TVariant(1),TVariant(1)); var_Items->set_CellValue(TVariant(h1),TVariant(2),TVariant(2)); var_Items->set_CellValue(TVariant(h1),TVariant(3),TVariant(3)); h1 = var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->set_CellValue(TVariant(h1),TVariant(1),TVariant(4)); var_Items->set_CellValue(TVariant(h1),TVariant(2),TVariant(5)); var_Items->set_CellValue(TVariant(h1),TVariant(3),TVariant(6)); var_Items->set_ExpandItem(h,true); |
1238 |
Is it possible to specify the cell's value but still want to display some formatted text instead the value
G2antt1->BeginUpdate(); G2antt1->Chart->set_PaneWidth(true,0); G2antt1->MarkSearchColumn = false; Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Name"); Exg2anttlib_tlb::IColumnPtr var_Column = var_Columns->Add(L"Values"); var_Column->SortType = Exg2anttlib_tlb::SortTypeEnum::SortNumeric; var_Column->AllowSizing = false; var_Column->Width = 64; var_Column->FormatColumn = L"((0:=dbl(value)) < 10? '<fgcolor=808080><font ;7>' :'<b>') + currency(=:0)"; var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueFormat,TVariant(1)); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Root")); var_Items->set_FormatCell(TVariant(h),TVariant(1),L"'<none>'"); var_Items->set_CellValue(TVariant(var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"))),TVariant(1),TVariant(10)); var_Items->set_CellValue(TVariant(var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"))),TVariant(1),TVariant(15)); var_Items->set_CellValue(TVariant(var_Items->InsertItem(h,TNoParam(),TVariant("Child 3"))),TVariant(1),TVariant(25)); var_Items->set_ExpandItem(h,true); G2antt1->EndUpdate(); |
1237 |
I am using the FormatColumn to display the current currency, but would like hide some values. Is it possible
G2antt1->BeginUpdate(); G2antt1->Chart->set_PaneWidth(true,0); G2antt1->MarkSearchColumn = false; Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Name"); Exg2anttlib_tlb::IColumnPtr var_Column = var_Columns->Add(L"Values"); var_Column->SortType = Exg2anttlib_tlb::SortTypeEnum::SortNumeric; var_Column->AllowSizing = false; var_Column->Width = 64; var_Column->FormatColumn = L"((0:=dbl(value)) < 10? '<fgcolor=808080><font ;7>' :'<b>') + currency(=:0)"; var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueFormat,TVariant(1)); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Root")); var_Items->set_FormatCell(TVariant(h),TVariant(1),L" "); var_Items->set_CellValue(TVariant(var_Items->InsertItem(h,TNoParam(),TVariant("Child 1"))),TVariant(1),TVariant(10)); var_Items->set_CellValue(TVariant(var_Items->InsertItem(h,TNoParam(),TVariant("Child 2"))),TVariant(1),TVariant(15)); var_Items->set_CellValue(TVariant(var_Items->InsertItem(h,TNoParam(),TVariant("Child 3"))),TVariant(1),TVariant(25)); var_Items->set_ExpandItem(h,true); G2antt1->EndUpdate(); |
1236 |
I have a right-aligned column with check-boxes with no text, but it is not perfectly aligned. Is there something I can do
G2antt1->BeginUpdate(); G2antt1->TreeColumnIndex = -1; G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exAllLines; G2antt1->ShowFocusRect = false; Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; Exg2anttlib_tlb::IColumnPtr var_Column = var_Columns->Add(L"Default-Right"); var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellHasCheckBox,TVariant(true)); var_Column->Alignment = Exg2anttlib_tlb::AlignmentEnum::RightAlignment; var_Column->HeaderAlignment = Exg2anttlib_tlb::AlignmentEnum::RightAlignment; Exg2anttlib_tlb::IColumnPtr var_Column1 = var_Columns->Add(L"Custom-Right"); var_Column1->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellHasCheckBox,TVariant(true)); var_Column1->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellDrawPartsOrder,TVariant("icon,icons,picture,caption,check")); var_Column1->HeaderAlignment = Exg2anttlib_tlb::AlignmentEnum::RightAlignment; var_Column1->Alignment = Exg2anttlib_tlb::AlignmentEnum::RightAlignment; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddItem(TNoParam()); var_Items->AddItem(TNoParam()); var_Items->AddItem(TNoParam()); G2antt1->EndUpdate(); |
1235 |
How can I specify that once I move or resize a bar other should be automatically moved/resized
G2antt1->BeginUpdate(); G2antt1->MarkSearchColumn = false; G2antt1->Columns->Add(L"Tasks"); G2antt1->Columns->Add(L"Start")->Visible = false; G2antt1->Columns->Add(L"End")->Visible = false; Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double())); var_Chart->set_PaneWidth(false,64); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Item 1")); var_Items->set_CellValue(TVariant(h1),TVariant(1),TVariant(TDateTime(2006,9,21).operator double())); var_Items->set_CellValue(TVariant(h1),TVariant(2),TVariant(TDateTime(2006,9,24).operator double())); var_Items->AddBar(h1,TVariant("Task"),TVariant(var_Items->get_CellValue(TVariant(h1),TVariant(1))),TVariant(var_Items->get_CellValue(TVariant(h1),TVariant(2))),TVariant(""),TNoParam()); long h2 = var_Items->AddItem(TVariant("Item 2")); var_Items->set_CellValue(TVariant(h2),TVariant(1),TVariant(TDateTime(2006,9,21).operator double())); var_Items->set_CellValue(TVariant(h2),TVariant(2),TVariant(TDateTime(2006,9,24).operator double())); var_Items->AddBar(h2,TVariant("Task"),TVariant(var_Items->get_CellValue(TVariant(h2),TVariant(1))),TVariant(var_Items->get_CellValue(TVariant(h2),TVariant(2))),TVariant(""),TNoParam()); var_Items->GroupBars(h1,TVariant(""),true,h2,TVariant(""),true,TNoParam(),TNoParam()); var_Items->GroupBars(h1,TVariant(""),false,h2,TVariant(""),false,TNoParam(),TNoParam()); G2antt1->EndUpdate(); |
1234 |
How can I specify that once I move a bar other should be automatically moved
G2antt1->BeginUpdate(); G2antt1->MarkSearchColumn = false; G2antt1->Columns->Add(L"Tasks"); G2antt1->Columns->Add(L"Start")->Visible = false; G2antt1->Columns->Add(L"End")->Visible = false; Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double())); var_Chart->set_PaneWidth(false,64); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Item 1")); var_Items->set_CellValue(TVariant(h1),TVariant(1),TVariant(TDateTime(2006,9,21).operator double())); var_Items->set_CellValue(TVariant(h1),TVariant(2),TVariant(TDateTime(2006,9,24).operator double())); var_Items->AddBar(h1,TVariant("Task"),TVariant(var_Items->get_CellValue(TVariant(h1),TVariant(1))),TVariant(var_Items->get_CellValue(TVariant(h1),TVariant(2))),TVariant(""),TNoParam()); long h2 = var_Items->AddItem(TVariant("Item 2")); var_Items->set_CellValue(TVariant(h2),TVariant(1),TVariant(TDateTime(2006,9,21).operator double())); var_Items->set_CellValue(TVariant(h2),TVariant(2),TVariant(TDateTime(2006,9,24).operator double())); var_Items->AddBar(h2,TVariant("Task"),TVariant(var_Items->get_CellValue(TVariant(h2),TVariant(1))),TVariant(var_Items->get_CellValue(TVariant(h2),TVariant(2))),TVariant(""),TNoParam()); var_Items->GroupBars(h1,TVariant(""),true,h2,TVariant(""),true,TVariant(3),TNoParam()); G2antt1->EndUpdate(); |
1233 |
Is it possible to include the bar's caption in overlaying
G2antt1->BeginUpdate(); G2antt1->ScrollBySingleLine = true; G2antt1->Columns->Add(L"Task"); G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exHLines; Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exHLines; var_Chart->AllowCreateBar = Exg2anttlib_tlb::CreateBarEnum::exCreateBarAuto; var_Chart->AllowLinkBars = false; var_Chart->ResizeUnitScale = Exg2anttlib_tlb::UnitEnum::exHour; var_Chart->set_PaneWidth(false,48); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Task")); var_Bar->OverlaidType = Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsIncludeCaption | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStackAutoArrange | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStack; var_Bar->OverlaidGroup = L"Milestone"; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("A1"),TVariant("task")); var_Items->set_ItemBar(h,TVariant("A1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(18)); var_Items->AddBar(h,TVariant("Milestone"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,3).operator double()),TVariant("M"),TVariant("milestone")); var_Items->set_ItemBar(h,TVariant("M"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(18)); h = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,12).operator double()),TVariant("A1"),TVariant("task")); var_Items->set_ItemBar(h,TVariant("A1"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(18)); var_Items->AddBar(h,TVariant("Milestone"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("M"),TVariant("milestone")); var_Items->set_ItemBar(h,TVariant("M"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarHAlignCaption,TVariant(18)); G2antt1->EndUpdate(); |
1232 |
Sometimes, the milestone bars are not overlaying the task bars. What I am doing wrong
G2antt1->BeginUpdate(); G2antt1->ScrollBySingleLine = true; G2antt1->Columns->Add(L"Task"); G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exHLines; Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exHLines; var_Chart->AllowCreateBar = Exg2anttlib_tlb::CreateBarEnum::exCreateBarAuto; var_Chart->AllowLinkBars = false; var_Chart->ResizeUnitScale = Exg2anttlib_tlb::UnitEnum::exHour; var_Chart->set_PaneWidth(false,48); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Task")); var_Bar->OverlaidType = Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsIncludeCaption | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStackAutoArrange | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStack; var_Bar->OverlaidGroup = L"Milestone"; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("A1"),TNoParam()); var_Items->AddBar(h,TVariant("Milestone"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,3).operator double()),TVariant("M"),TNoParam()); h = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,7).operator double()),TVariant(TDateTime(2001,1,10).operator double()),TVariant("A1"),TNoParam()); var_Items->AddBar(h,TVariant("Milestone"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("M"),TNoParam()); G2antt1->EndUpdate(); |
1231 |
Is it possible to add milestone bars in the same overlaid group as task is
G2antt1->BeginUpdate(); G2antt1->ScrollBySingleLine = true; G2antt1->Columns->Add(L"Task"); G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exHLines; Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exHLines; var_Chart->AllowCreateBar = Exg2anttlib_tlb::CreateBarEnum::exCreateBarAuto; var_Chart->AllowLinkBars = false; var_Chart->ResizeUnitScale = Exg2anttlib_tlb::UnitEnum::exHour; var_Chart->set_PaneWidth(false,48); var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2001,1,1).operator double())); Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Task")); var_Bar->OverlaidType = Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStackAutoArrange | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStack; var_Bar->OverlaidGroup = L"Milestone"; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,2).operator double()),TVariant(TDateTime(2001,1,4).operator double()),TVariant("A1"),TNoParam()); var_Items->AddBar(h,TVariant("Milestone"),TVariant(TDateTime(2001,1,3).operator double()),TVariant(TDateTime(2001,1,3).operator double()),TVariant("M"),TNoParam()); h = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2001,1,7).operator double()),TVariant(TDateTime(2001,1,10).operator double()),TVariant("A1"),TNoParam()); var_Items->AddBar(h,TVariant("Milestone"),TVariant(TDateTime(2001,1,8).operator double()),TVariant(TDateTime(2001,1,8).operator double()),TVariant("M"),TNoParam()); G2antt1->EndUpdate(); |
1230 |
When adding a date column and setting the SortType to SortTypeEnum.SortDateTime, the column still sorts as a string. What am I doing wrong
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Date")->SortType = Exg2anttlib_tlb::SortTypeEnum::SortDateTime; G2antt1->Columns->Add(L"String"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant(TDateTime(2001,1,1).operator double())); var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant(var_Items->get_CellValue(TVariant(h),TVariant(0)))); h = var_Items->AddItem(TVariant(TDateTime(2001,1,11).operator double())); var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant(var_Items->get_CellValue(TVariant(h),TVariant(0)))); h = var_Items->AddItem(TVariant(TDateTime(2001,1,2).operator double())); var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant(var_Items->get_CellValue(TVariant(h),TVariant(0)))); G2antt1->Columns->get_Item(TVariant(0))->SortOrder = Exg2anttlib_tlb::SortOrderEnum::SortDescending; G2antt1->EndUpdate(); |
1229 |
Is it possible to move an item from a parent to another
G2antt1->BeginUpdate(); G2antt1->LinesAtRoot = Exg2anttlib_tlb::LinesAtRootEnum::exLinesAtRoot; G2antt1->Columns->Add(L"Items"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddItem(TVariant("A")); var_Items->AddItem(TVariant("B")); var_Items->InsertItem(var_Items->AddItem(TVariant("C")),TVariant(""),TVariant("D")); var_Items->SetParent(var_Items->get_FindItem(TVariant("D"),TVariant(0),TNoParam()),var_Items->get_FindItem(TVariant("A"),TVariant(0),TNoParam())); G2antt1->EndUpdate(); |
1228 |
How can I change the identation for an item
G2antt1->BeginUpdate(); G2antt1->LinesAtRoot = Exg2anttlib_tlb::LinesAtRootEnum::exLinesAtRoot; G2antt1->Columns->Add(L"Items"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddItem(TVariant("A")); var_Items->AddItem(TVariant("B")); var_Items->InsertItem(var_Items->AddItem(TVariant("C")),TVariant(""),TVariant("D")); var_Items->SetParent(var_Items->get_FindItem(TVariant("D"),TVariant(0),TNoParam()),0); G2antt1->EndUpdate(); |
1227 |
Moving the bars fail if I am using GroupBars, exBarCanResize on 0 and exBarKeepWorkingCount on True ( bars keeps the working units and at runtime user can not resize them ). Is it possible to use the GroupBars while user should not be able to resize the bars at runtime
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Tasks"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double())); var_Chart->set_PaneWidth(false,48); var_Chart->LevelCount = 2; var_Chart->Bars->Add(L"Task:Split")->Shortcut = L"Task"; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant(""),TVariant("A")); var_Items->set_ItemBar(h1,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); var_Items->set_ItemBar(h1,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarCanResize,TVariant(4)); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant(""),TVariant("B")); var_Items->set_ItemBar(h2,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); var_Items->set_ItemBar(h2,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarCanResize,TVariant(4)); var_Items->AddLink(TVariant("L1"),h1,TVariant(""),h2,TVariant("")); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkStartPos,TVariant(2)); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkEndPos,TVariant(0)); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitInterval + exLimitIntervalTreatAsWorking")); var_Items->GroupBars(h1,TVariant(""),false,h2,TVariant(""),true,TVariant(95),TVariant("2")); G2antt1->EndUpdate(); |
1226 |
How can I collapse all items
G2antt1->BeginUpdate(); G2antt1->LinesAtRoot = Exg2anttlib_tlb::LinesAtRootEnum::exLinesAtRoot; G2antt1->Columns->Add(L"Items"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Root 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); h = var_Items->AddItem(TVariant("Root 2")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->set_ExpandItem(0,false); G2antt1->EndUpdate(); |
1225 |
How can I expand all items
G2antt1->BeginUpdate(); G2antt1->LinesAtRoot = Exg2anttlib_tlb::LinesAtRootEnum::exLinesAtRoot; G2antt1->Columns->Add(L"Items"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Root 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); h = var_Items->AddItem(TVariant("Root 2")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 1")); var_Items->InsertItem(h,TNoParam(),TVariant("Child 2")); var_Items->set_ExpandItem(0,true); G2antt1->EndUpdate(); |
1224 |
How can I specify the distance between bars to be in a specified range of working units
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Tasks"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double())); var_Chart->set_PaneWidth(false,48); var_Chart->LevelCount = 2; var_Chart->Bars->Add(L"Task:Split")->Shortcut = L"Task"; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant(""),TVariant("A")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant(""),TVariant("B")); var_Items->AddLink(TVariant("L1"),h1,TVariant(""),h2,TVariant("")); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkStartPos,TVariant(2)); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkEndPos,TVariant(0)); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitInterval+exLimitIntervalTreatAsWorking")); var_Items->GroupBars(h1,TVariant(""),false,h2,TVariant(""),true,TVariant(95),TVariant("0;1;5")); var_Items->set_ItemBar(0,TVariant("<*>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); G2antt1->EndUpdate(); |
1223 |
How can I specify the distance between bars to be in a specified range
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Tasks"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double())); var_Chart->set_PaneWidth(false,48); var_Chart->LevelCount = 2; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant(""),TVariant("A")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant(""),TVariant("B")); var_Items->AddLink(TVariant("L1"),h1,TVariant(""),h2,TVariant("")); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkStartPos,TVariant(2)); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkEndPos,TVariant(0)); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("exPreserveBarLength + exIgnoreOriginalInterval + exLimitInterval")); var_Items->GroupBars(h1,TVariant(""),false,h2,TVariant(""),true,TVariant(31),TVariant("0;1;7")); G2antt1->EndUpdate(); |
1222 |
How can I specify the distance between bars to be no more than a specified value in working units
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Tasks"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double())); var_Chart->set_PaneWidth(false,48); var_Chart->LevelCount = 2; var_Chart->Bars->Add(L"Task:Split")->Shortcut = L"Task"; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant(""),TVariant("A")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant(""),TVariant("B")); var_Items->AddLink(TVariant("L1"),h1,TVariant(""),h2,TVariant("")); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkStartPos,TVariant(2)); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkEndPos,TVariant(0)); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitInterval+exLimitIntervalTreatAsWorking")); var_Items->GroupBars(h1,TVariant(""),false,h2,TVariant(""),true,TVariant(95),TVariant("0;0;2")); var_Items->set_ItemBar(0,TVariant("<*>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); G2antt1->EndUpdate(); |
1221 |
How can I specify the distance between bars to be no more than a specified value
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Tasks"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double())); var_Chart->set_PaneWidth(false,48); var_Chart->LevelCount = 2; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant(""),TVariant("A")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant(""),TVariant("B")); var_Items->AddLink(TVariant("L1"),h1,TVariant(""),h2,TVariant("")); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkStartPos,TVariant(2)); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkEndPos,TVariant(0)); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("exPreserveBarLength + exIgnoreOriginalInterval + exLimitInterval")); var_Items->GroupBars(h1,TVariant(""),false,h2,TVariant(""),true,TVariant(31),TVariant("0;0;2")); G2antt1->EndUpdate(); |
1220 |
How can I specify the distance between bars to be no less than a specified value in working units
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Tasks"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double())); var_Chart->set_PaneWidth(false,48); var_Chart->LevelCount = 2; var_Chart->Bars->Add(L"Task:Split")->Shortcut = L"Task"; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant(""),TVariant("A")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant(""),TVariant("B")); var_Items->AddLink(TVariant("L1"),h1,TVariant(""),h2,TVariant("")); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkStartPos,TVariant(2)); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkEndPos,TVariant(0)); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitIntervalMin + exLimitIntervalTreatAsWorking")); var_Items->GroupBars(h1,TVariant(""),false,h2,TVariant(""),true,TVariant(79),TVariant("2")); var_Items->set_ItemBar(0,TVariant("<*>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); G2antt1->EndUpdate(); |
1219 |
How can I specify the distance between bars to be no less than a specified value
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Tasks"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double())); var_Chart->set_PaneWidth(false,48); var_Chart->LevelCount = 2; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant(""),TVariant("A")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant(""),TVariant("B")); var_Items->AddLink(TVariant("L1"),h1,TVariant(""),h2,TVariant("")); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkStartPos,TVariant(2)); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkEndPos,TVariant(0)); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("exPreserveBarLength + exIgnoreOriginalInterval + exLimitIntervalMin")); var_Items->GroupBars(h1,TVariant(""),false,h2,TVariant(""),true,TVariant(15),TVariant("2")); G2antt1->EndUpdate(); |
1218 |
How do I specify the distance between bars to be exactly the specified value in working units
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Tasks"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double())); var_Chart->set_PaneWidth(false,48); var_Chart->LevelCount = 2; var_Chart->Bars->Add(L"Task:Split")->Shortcut = L"Task"; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant(""),TVariant("A")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); var_Items->AddItem(TVariant("")); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant(""),TVariant("B")); var_Items->AddLink(TVariant("L1"),h1,TVariant(""),h2,TVariant("")); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkStartPos,TVariant(2)); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkEndPos,TVariant(0)); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("exPreserveBarLength + exIgnoreOriginalInterval<br>exLimitInterval + exLimitIntervalTreatAsWorking")); var_Items->GroupBars(h1,TVariant(""),false,h2,TVariant(""),true,TVariant(95),TVariant("2")); var_Items->set_ItemBar(0,TVariant("<*>"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); G2antt1->EndUpdate(); |
1217 |
How do I specify the distance between bars to be exactly the specified value
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Tasks"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double())); var_Chart->set_PaneWidth(false,48); var_Chart->LevelCount = 2; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant(""),TVariant("A")); var_Items->AddItem(TVariant("")); long h2 = var_Items->AddItem(TVariant("Task 2")); var_Items->AddBar(h2,TVariant("Unknown"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant(""),TVariant("B")); var_Items->AddLink(TVariant("L1"),h1,TVariant(""),h2,TVariant("")); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkStartPos,TVariant(2)); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkEndPos,TVariant(0)); var_Items->set_Link(TVariant("L1"),Exg2anttlib_tlb::LinkPropertyEnum::exLinkText,TVariant("exPreserveBarLength + exIgnoreOriginalInterval")); var_Items->GroupBars(h1,TVariant(""),false,h2,TVariant(""),true,TVariant(7),TVariant("2")); G2antt1->EndUpdate(); |
1216 |
How do I specify the day's duration to be working only
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Tasks"); G2antt1->Chart->Bars->Add(L"Task:Split")->Shortcut = L"Task"; Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double())); var_Chart->set_PaneWidth(false,48); var_Chart->LevelCount = 2; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant("A"),TNoParam()); var_Items->set_ItemBar(h1,TVariant("A"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); G2antt1->EndUpdate(); |
1215 |
How do I specify the the user can't resize the bar at left side ( starting point )
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Tasks"); G2antt1->Chart->Bars->Add(L"Task:Split")->Shortcut = L"Task"; Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double())); var_Chart->set_PaneWidth(false,48); var_Chart->LevelCount = 2; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant("A"),TVariant("not resizable on left")); var_Items->set_ItemBar(h1,TVariant("A"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarKeepWorkingCount,TVariant(true)); G2antt1->EndUpdate(); |
1214 |
How do I specify the the user can't resize the bar at left side ( starting point )
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Tasks"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double())); var_Chart->set_PaneWidth(false,48); var_Chart->LevelCount = 2; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant("A"),TVariant("not resizable on left")); var_Items->set_ItemBar(h1,TVariant("A"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarCanResize,TVariant(2)); G2antt1->EndUpdate(); |
1213 |
How do I specify the the user can't resize the bar at right side ( ending point )
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Tasks"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double())); var_Chart->set_PaneWidth(false,48); var_Chart->LevelCount = 2; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant("A"),TVariant("not resizable on right")); var_Items->set_ItemBar(h1,TVariant("A"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarCanResize,TVariant(1)); G2antt1->EndUpdate(); |
1212 |
How do I specify the the user can't resize the bar at runtime
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Tasks"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double())); var_Chart->set_PaneWidth(false,48); var_Chart->LevelCount = 2; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant("A"),TVariant("not resizable")); var_Items->set_ItemBar(h1,TVariant("A"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarCanResize,TVariant(false)); G2antt1->EndUpdate(); |
1211 |
How do I specify the day's duration to be at least a specified length
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Tasks"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double())); var_Chart->set_PaneWidth(false,48); var_Chart->LevelCount = 2; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant("A"),TVariant("> 2 Days")); var_Items->set_ItemBar(h1,TVariant("A"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarMinDuration,TVariant(2)); G2antt1->EndUpdate(); |
1210 |
How do I specify the day's duration to be maximum a specified length
G2antt1->BeginUpdate(); G2antt1->Columns->Add(L"Tasks"); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2006,9,20).operator double())); var_Chart->set_PaneWidth(false,48); var_Chart->LevelCount = 2; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h1 = var_Items->AddItem(TVariant("Task 1")); var_Items->AddBar(h1,TVariant("Task"),TVariant(TDateTime(2006,9,26).operator double()),TVariant(TDateTime(2006,9,29).operator double()),TVariant("A"),TVariant("< 3 Days")); var_Items->set_ItemBar(h1,TVariant("A"),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarMaxDuration,TVariant(3)); G2antt1->EndUpdate(); |
1209 |
I am trying to construct a timeline that is not date specific. My timeline starts at T=00:00:00 and then increases by 5 seconds. Is it possible
Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_PaneWidth(false,0); var_Chart->set_FirstVisibleDate(TVariant(0)); var_Chart->UnitWidth = 48; var_Chart->NonworkingDays = 0; Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(0); var_Level->set_Label(TVariant("<%hh%>:<%nn%>:<%ss%>")); var_Level->Unit = Exg2anttlib_tlb::UnitEnum::exSecond; var_Level->Count = 5; |
1208 |
How can I specify the levels using the user's Regional and Language Options
G2antt1->BeginUpdate(); G2antt1->Font->Name = L"Arial Unicode MS"; G2antt1->HeaderHeight = 36; Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2010,5,30).operator double())); var_Chart->set_PaneWidth(false,0); var_Chart->FirstWeekDay = Exg2anttlib_tlb::WeekDayEnum::exMonday; var_Chart->UnitWidth = 36; var_Chart->LevelCount = 2; Exg2anttlib_tlb::ILevelPtr var_Level = var_Chart->get_Level(0); var_Level->set_Label(TVariant("<b><%loc_mmmm%></b> <%yyyy%><br><%loc_sdate%><r> <%ww%> ")); var_Level->set_ToolTip(TVariant(var_Level->get_Label())); var_Level->Unit = Exg2anttlib_tlb::UnitEnum::exWeek; Exg2anttlib_tlb::ILevelPtr var_Level1 = var_Chart->get_Level(1); var_Level1->set_Label(TVariant("<%loc_ddd%><br><%d%>")); var_Level1->set_ToolTip(TVariant(var_Level1->get_Label())); var_Chart->ToolTip = L"<%loc_ldate%>"; G2antt1->EndUpdate(); |
1207 |
How do I arrange, format or layout the item on multiple levels or lines, as a subform
G2antt1->BeginUpdate(); G2antt1->Chart->set_PaneWidth(true,0); G2antt1->Images(TVariant(String("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") + "lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" + "0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" + "NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")); G2antt1->DrawGridLines = Exg2anttlib_tlb::GridLinesEnum::exRowLines; G2antt1->HeaderVisible = Exg2anttlib_tlb::HeaderVisibleEnum::exHeaderHidden; G2antt1->ItemsAllowSizing = Exg2anttlib_tlb::ItemsAllowSizingEnum::exResizeItem; G2antt1->MarkSearchColumn = false; G2antt1->ScrollBySingleLine = true; G2antt1->BackColor = RGB(255,255,255); G2antt1->SelBackColor = RGB(255,255,255); G2antt1->SelForeColor = 0x80000012; Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L""); Exg2anttlib_tlb::IColumnPtr var_Column = var_Columns->Add(L"Column"); var_Column->Visible = false; var_Column->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::EditType; Exg2anttlib_tlb::IColumnPtr var_Column1 = var_Columns->Add(L"Column"); var_Column1->Visible = false; var_Column1->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::DropDownType; Exg2anttlib_tlb::IColumnPtr var_Column2 = var_Columns->Add(L"Column"); var_Column2->Visible = false; var_Column2->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::DropDownType; Exg2anttlib_tlb::IColumnPtr var_Column3 = var_Columns->Add(L"Column"); var_Column3->Visible = false; Exg2anttlib_tlb::IEditorPtr var_Editor = var_Column3->Editor; var_Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::CheckValueType; var_Editor->set_Option(Exg2anttlib_tlb::EditorOptionEnum::exCheckValue2,TVariant(1)); Exg2anttlib_tlb::IColumnPtr var_Column4 = var_Columns->Add(L"Column"); var_Column4->Visible = false; var_Column4->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::DateType; var_Columns->Add(L"Column")->Visible = false; Exg2anttlib_tlb::IColumnPtr var_Column5 = var_Columns->Add(L"Column"); var_Column5->Visible = false; var_Column5->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::DropDownType; Exg2anttlib_tlb::IColumnPtr var_Column6 = var_Columns->Add(L"Column"); var_Column6->Visible = false; var_Column6->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellSingleLine,TVariant(0)); var_Editor = var_Column6->Editor; var_Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::MemoType; var_Editor->ButtonWidth = 17; var_Editor->set_Option(Exg2anttlib_tlb::EditorOptionEnum::exDownArrow,TVariant(0)); var_Editor->set_Option(Exg2anttlib_tlb::EditorOptionEnum::exEndKey,TVariant(0)); var_Editor->set_Option(Exg2anttlib_tlb::EditorOptionEnum::exHomeKey,TVariant(0)); var_Editor->set_Option(Exg2anttlib_tlb::EditorOptionEnum::exLeftArrow,TVariant(0)); var_Editor->set_Option(Exg2anttlib_tlb::EditorOptionEnum::exMemoAutoSize,TVariant(0)); var_Editor->set_Option(Exg2anttlib_tlb::EditorOptionEnum::exMemoVScrollBar,TVariant(-1)); var_Editor->set_Option(Exg2anttlib_tlb::EditorOptionEnum::exPageDownKey,TVariant(0)); var_Editor->set_Option(Exg2anttlib_tlb::EditorOptionEnum::exPageUpKey,TVariant(0)); var_Editor->set_Option(Exg2anttlib_tlb::EditorOptionEnum::exRightArrow,TVariant(0)); var_Editor->set_Option(Exg2anttlib_tlb::EditorOptionEnum::exUpArrow,TVariant(0)); var_Column6->Visible = false; var_Columns->Add(L"Column")->Visible = false; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h0 = var_Items->AddItem(TVariant("")); var_Items->set_CellValue(TVariant(h0),TVariant(9),TVariant("Dismiss")); var_Items->set_CellFormatLevel(TVariant(h0),TVariant(0),TVariant(String("12;\" \"[b=0][bg=RGB(248,248,248)]/(\" \"[b=0][bg=RGB(248,248,248)]:12,(1;\" \"[b=0]/(\" \"[b=0]:1,(25;(5;\" \"[b=0]/((\"Subjec") + "t:\"[b=0]:80,(1;\" \"[b=0][bg=RGB(0,0,0)]/(\" \"[b=0][bg=RGB(0,0,0)]:1,(\" \"[b=0][bg=RGB(255,0,0)]:5,1[b=0]),\" \"[b=0][bg=RGB(" + "0,0,0)]:1)/1;\" \"[b=0][bg=RGB(0,0,0)]))/1;\" \"[b=0]))/20;(\"Location:\"[b=0]:80,(1;\" \"[b=0][bg=RGB(0,0,0)]/(\" \"[b=0][bg=RG" + "B(0,0,0)]:1,2[b=0],\" \"[b=0][bg=RGB(0,0,0)]:1)/1;\" \"[b=0][bg=RGB(0,0,0)]),((\" \"[b=0]:10,\"Label:\"[b=0])):50,(1;\" \"[b=0][" + "bg=RGB(0,0,0)]/(\" \"[b=0][bg=RGB(0,0,0)]:1,3[b=0],\" \"[b=0][bg=RGB(0,0,0)]:1)/1;\" \"[b=0][bg=RGB(0,0,0)]))/50;(10;\" \"[b=0]/" + "(1;\" \"[b=0][bg=RGB(255,0,0)]/(\"Recurrence:\"[b=0]:80,\"Occurs every day effective 20/04/2007 from 01:00 to 01:01.\"[b=0])/1;\" + "" \"[b=0][bg=RGB(255,0,0)])/10;\" \"[b=0])/23;(4[b=0]:20,\"Reminder:\"[b=0]:60,(1;\" \"[b=0][bg=RGB(0,0,0)]/(\" \"[b=0][bg=RGB(0" + ",0,0)]:1,5[b=0],\" \"[b=0][bg=RGB(0,0,0)]:1)/1;\" \"[b=0][bg=RGB(0,0,0)]),((\" \"[b=0]:5,6[b=0])):30,((\" \"[b=0]:10,\"Show time" + " as:\"[b=0])):90,(1;\" \"[b=0][bg=RGB(0,0,0)]/(\" \"[b=0][bg=RGB(0,0,0)]:1,7[b=0],\" \"[b=0][bg=RGB(0,0,0)]:1)/1;\" \"[b=0][bg=R" + "GB(0,0,0)]))/(12;\" \"[b=0]/(1;\" \"[b=0][bg=RGB(0,0,0)]/(\" \"[b=0][bg=RGB(0,0,0)]:1,8[b=0],\" \"[b=0][bg=RGB(0,0,0)]:1)/1;\" \" + ""[b=0][bg=RGB(0,0,0)]))/35;(5;\" \"[b=0]/(\" \"[b=0],\" \"[b=0],((\" \"[b=0]:40,9[b=0])))/5;\" \"[b=0])),\" \"[b=0]:1)/1;\" \"[b" + "=0]),\" \"[b=0][bg=RGB(248,248,248)]:12)/12;\" \"[b=0][bg=RGB(248,248,248)]")); var_Items->set_CellHasCheckBox(TVariant(h0),TVariant(4),true); var_Items->set_CellHasButton(TVariant(h0),TVariant(9),true); var_Items->set_CellHAlignment(TVariant(h0),TVariant(9),Exg2anttlib_tlb::AlignmentEnum::CenterAlignment); var_Items->set_CellVAlignment(TVariant(h0),TVariant(8),Exg2anttlib_tlb::VAlignmentEnum::exTop); var_Items->set_CellForeColor(TVariant(h0),TVariant(8),RGB(0,0,0)); var_Items->set_CellHasButton(TVariant(h0),TVariant(6),true); var_Items->set_CellValue(TVariant(h0),TVariant(6),TVariant("<img>1</img>")); var_Items->set_CellValueFormat(TVariant(h0),TVariant(6),Exg2anttlib_tlb::ValueFormatEnum::exHTML); var_Items->set_CellHAlignment(TVariant(h0),TVariant(6),Exg2anttlib_tlb::AlignmentEnum::CenterAlignment); var_Items->set_ItemHeight(h0,296); G2antt1->EndUpdate(); |
1206 |
How can I arrange the columns on multiple levels
G2antt1->BeginUpdate(); G2antt1->DefaultItemHeight = 48; Exg2anttlib_tlb::IColumnsPtr var_Columns = G2antt1->Columns; var_Columns->Add(L"Title")->Visible = false; var_Columns->Add(L"FirstName")->Visible = false; var_Columns->Add(L"LastName")->Visible = false; var_Columns->Add(L"Photo")->Visible = false; Exg2anttlib_tlb::IColumnPtr var_Column = var_Columns->Add(L"Address"); var_Column->Visible = false; var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellSingleLine,TVariant(false)); Exg2anttlib_tlb::IColumnPtr var_Column1 = var_Columns->Add(L"Personal Info"); var_Column1->FormatLevel = L"3:48,(0/1/2),4:96"; var_Column1->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellFormatLevel,TVariant("3:48,(0/1/2),4:96")); G2antt1->Chart->set_FirstVisibleDate(TVariant(TDateTime(2010,1,1).operator double())); G2antt1->Chart->Bars->get_Item(TVariant("Task"))->OverlaidType = Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStackAutoArrange | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStack; Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; long h = var_Items->AddItem(TVariant("Sales Representative")); var_Items->set_CellValue(TVariant(h),TVariant(1),TVariant("Nancy")); var_Items->set_CellValue(TVariant(h),TVariant(2),TVariant("Davolio")); var_Items->set_CellPicture(TVariant(h),TVariant(3),G2antt1->ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)")); var_Items->set_CellValue(TVariant(h),TVariant(4),TVariant("507-20th Ave. E.Apt. 2A")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2010,1,1).operator double()),TVariant(TDateTime(2010,1,5).operator double()),TVariant(2),TVariant(2)); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2010,1,4).operator double()),TVariant(TDateTime(2010,1,8).operator double()),TVariant(1),TVariant(1)); G2antt1->EndUpdate(); |
1205 |
Is it possible to display a bar only using a gradient color using the exBarColor option
G2antt1->BeginUpdate(); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2009,12,31).operator double())); var_Chart->LevelCount = 2; var_Chart->set_PaneWidth(false,96); Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Task")); var_Bar->StartColor = RGB(255,255,255); var_Bar->EndColor = var_Bar->StartColor; var_Bar->Height = 17; G2antt1->Columns->Add(L"Types"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Original")),TVariant("Task"),TVariant(TDateTime(2010,1,4).operator double()),TVariant(TDateTime(2010,1,9).operator double()),TVariant(""),TNoParam()); long h = var_Items->AddItem(TVariant("W/h Gradient")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2010,1,4).operator double()),TVariant(TDateTime(2010,1,9).operator double()),TVariant(""),TNoParam()); var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarPattern,TVariant(227)); h = var_Items->AddItem(TVariant("W/h Color")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2010,1,4).operator double()),TVariant(TDateTime(2010,1,9).operator double()),TVariant(""),TNoParam()); var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarPattern,TVariant(227)); var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarColor,TVariant(255)); var_Items->AddBar(var_Items->AddItem(TVariant("Original")),TVariant("Task"),TVariant(TDateTime(2010,1,4).operator double()),TVariant(TDateTime(2010,1,9).operator double()),TVariant(""),TNoParam()); G2antt1->EndUpdate(); |
1204 |
Is it possible to display a bar only using a gradient color
G2antt1->BeginUpdate(); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2009,12,31).operator double())); var_Chart->LevelCount = 2; var_Chart->set_PaneWidth(false,96); Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Task")); var_Bar->StartColor = RGB(255,255,255); var_Bar->EndColor = var_Bar->StartColor; var_Bar->Height = 17; G2antt1->Columns->Add(L"Types"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Original")),TVariant("Task"),TVariant(TDateTime(2010,1,4).operator double()),TVariant(TDateTime(2010,1,9).operator double()),TVariant(""),TNoParam()); long h = var_Items->AddItem(TVariant("W/h Gradient")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2010,1,4).operator double()),TVariant(TDateTime(2010,1,9).operator double()),TVariant(""),TNoParam()); var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarPattern,TVariant(227)); var_Items->AddBar(var_Items->AddItem(TVariant("Original")),TVariant("Task"),TVariant(TDateTime(2010,1,4).operator double()),TVariant(TDateTime(2010,1,9).operator double()),TVariant(""),TNoParam()); G2antt1->EndUpdate(); |
1203 |
Is it possible to display a bar only using a gradient color
G2antt1->BeginUpdate(); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2009,12,31).operator double())); var_Chart->LevelCount = 2; var_Chart->set_PaneWidth(false,96); Exg2anttlib_tlb::IBarPtr var_Bar = var_Chart->Bars->get_Item(TVariant("Task")); var_Bar->StartColor = RGB(255,255,255); var_Bar->EndColor = var_Bar->Color; G2antt1->Columns->Add(L"Types"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Original")),TVariant("Task"),TVariant(TDateTime(2010,1,4).operator double()),TVariant(TDateTime(2010,1,9).operator double()),TVariant(""),TNoParam()); long h = var_Items->AddItem(TVariant("W/h Gradient")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2010,1,4).operator double()),TVariant(TDateTime(2010,1,9).operator double()),TVariant(""),TNoParam()); var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarPattern,TVariant(99)); var_Items->AddBar(var_Items->AddItem(TVariant("Original")),TVariant("Task"),TVariant(TDateTime(2010,1,4).operator double()),TVariant(TDateTime(2010,1,9).operator double()),TVariant(""),TNoParam()); G2antt1->EndUpdate(); |
1202 |
How can I display a specified bar only with a thicker border
G2antt1->BeginUpdate(); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2009,12,31).operator double())); var_Chart->LevelCount = 2; var_Chart->set_PaneWidth(false,96); G2antt1->Columns->Add(L"Types"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Original")),TVariant("Task"),TVariant(TDateTime(2010,1,4).operator double()),TVariant(TDateTime(2010,1,9).operator double()),TVariant(""),TNoParam()); long h = var_Items->AddItem(TVariant("W/h Border")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2010,1,4).operator double()),TVariant(TDateTime(2010,1,9).operator double()),TVariant(""),TNoParam()); var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarPattern,TVariant(4099)); var_Items->AddBar(var_Items->AddItem(TVariant("Original")),TVariant("Task"),TVariant(TDateTime(2010,1,4).operator double()),TVariant(TDateTime(2010,1,9).operator double()),TVariant(""),TNoParam()); G2antt1->EndUpdate(); |
1201 |
Is it possible to display the shadow for a specified bar
G2antt1->BeginUpdate(); Exg2anttlib_tlb::IChartPtr var_Chart = G2antt1->Chart; var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2009,12,31).operator double())); var_Chart->LevelCount = 2; var_Chart->set_PaneWidth(false,96); G2antt1->Columns->Add(L"Types"); Exg2anttlib_tlb::IItemsPtr var_Items = G2antt1->Items; var_Items->AddBar(var_Items->AddItem(TVariant("Original")),TVariant("Task"),TVariant(TDateTime(2010,1,4).operator double()),TVariant(TDateTime(2010,1,9).operator double()),TVariant(""),TNoParam()); long h = var_Items->AddItem(TVariant("W/h Shadow")); var_Items->AddBar(h,TVariant("Task"),TVariant(TDateTime(2010,1,4).operator double()),TVariant(TDateTime(2010,1,9).operator double()),TVariant(""),TNoParam()); var_Items->set_ItemBar(h,TVariant(""),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarPattern,TVariant(8195)); var_Items->AddBar(var_Items->AddItem(TVariant("Original")),TVariant("Task"),TVariant(TDateTime(2010,1,4).operator double()),TVariant(TDateTime(2010,1,9).operator double()),TVariant(""),TNoParam()); G2antt1->EndUpdate(); |